<%--
  Created by IntelliJ IDEA.
  User: zuxia
  Date: 2018/7/19
  Time: 13:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>

    <link rel="stylesheet" href="css/amazeui.min.css">
    <link rel="stylesheet" href="css/admin.css">
    <style>
        .admin-main{
            padding-top: 0px;
        }
        .menu-add{
            height: 45px;
            margin-top: 10px;
        }
        .am-u-sm-9{
            margin-top: 5px;
        }
    </style>
</head>
<body>

<div class="am-cf admin-main">
    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-g">
                <form class="am-form am-form-horizontal" action="/isFull-admin/queryMMname.action" method="post" style="padding-top: 30px;"  target="_parent">
                    <div class="am-form-group">
                       <div class="menu-add">
                           <label  class="am-u-sm-3 am-form-label">
                               菜品名称
                           </label>
                           <div class="am-u-sm-9">
                               <input id="roleName" required="" placeholder="请输入菜品名称" value="" name="menuinfoEntity.mname" type="text">
                           </div>
                       </div>
                        <div class="menu-add">
                            <label class="am-u-sm-3 am-form-label">
                                菜品类型
                            </label>
                            <div class="am-u-sm-9">
                                <select name="menuinfoEntity.tid">
                                </select>
                            </div>
                        </div>
                        <div class="menu-add">
                            <label class="am-u-sm-3 am-form-label">
                                菜品图片
                            </label>
                            <div class="am-u-sm-9">
                                <input type="file" name="menuinfoEntity.mimg"/>
                            </div>
                        </div>
                        <div class="menu-add">
                            <label class="am-u-sm-3 am-form-label">
                                菜品价格
                            </label>
                            <div class="am-u-sm-9">
                                <input id="rolePrice" required="" placeholder="请输入菜品价格" value="" name="menuinfoEntity.mprice" type="text">
                            </div>
                        </div>
                        <div class="menu-add">
                            <label  class="am-u-sm-3 am-form-label">
                                菜品详情
                            </label>
                            <div class="am-u-sm-9">
                                <input id="roleMdetails" required="" placeholder="请输入菜品详情" value="" name="menuinfoEntity.mdetails" type="text">
                            </div>
                        </div>
                        <div class="menu-add">
                            <div class="am-u-sm-9 am-u-sm-push-3">
                                <input id="addRole" class="am-btn am-btn-success" value="添加" type="submit">
                            </div>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>
</body>
<script src="js/jquery-1.11.3.min.js"></script>
<!--<![endif]-->
<script type="text/javascript" src="myplugs/js/plugs.js"></script>

<script>
    $(function() {
        $.ajax({
            type: "get",//使用post方法访问后台
            dataType: "json",//返回json格式的数据
            url: "/isFull-admin/typelist.action",//要访问的后台地址
            contentType: "application/json;charset=utf-8",
            data: { },//要发送的数据
            success: function(data){//data为返回的数据，在这里做数据绑定
                var types = data.data;
                for(var i=0;i<types.length;i++){
                    var type = types[i];
                    $("select").append("<option value='"+types[i].tid+"'>"+types[i].tName+"</option>");
                }
            }
        });
    });
</script>
</html>

